package com.fzhucc.modules.large;
import com.alibaba.fastjson.JSONObject;
import com.fzhucc.annotation.Log;
import com.fzhucc.annotation.rest.AnonymousGetMapping;
import com.fzhucc.modules.appletShow.service.AppletShowService;
import com.fzhucc.modules.large.service.LargeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author yyg
 * @date 2022-12-06
 **/
@RestController
@RequiredArgsConstructor
@Api(tags = "科创：大屏展示")
@RequestMapping("/api/large")
public class LargeController {

    private final LargeService largeService;

    @Log("查询大屏专家数据")
    @ApiOperation("查询大屏专家数据")
    @AnonymousGetMapping("/getExpert")
    public ResponseEntity<Object> getExpert() {
        return new ResponseEntity<>(largeService.getExpert(), HttpStatus.OK);
    }

    @Log("查询项目库数据")
    @ApiOperation("查询项目库数据")
    @AnonymousGetMapping("/getProjectLibrary")
    public ResponseEntity<Object> getProjectLibrary() {
        return new ResponseEntity<>(largeService.getProjectLibrary(), HttpStatus.OK);
    }

    @Log("查询项目来源数据")
    @ApiOperation("查询项目来源数据")
    @AnonymousGetMapping("/getProjectSource")
    public ResponseEntity<Object> getProjectSource() {
        return new ResponseEntity<>(largeService.getProjectSource(), HttpStatus.OK);
    }

    @Log("查询智库数据")
    @ApiOperation("查询智库数据")
    @AnonymousGetMapping("/getThinkTanks")
    public ResponseEntity<Object> getThinkTanks() {
        return new ResponseEntity<>(largeService.getThinkTanks(), HttpStatus.OK);
    }

    @Log("查询成果转移数据  未有数据后续完善")
    @ApiOperation("查询成果转移数据 未有数据后续完善")
    @AnonymousGetMapping("/getResultsTransfer")
    public ResponseEntity<Object> getResultsTransfer() {
        return new ResponseEntity<>(largeService.getResultsTransfer(), HttpStatus.OK);
    }

    @Log("查询服务情况数据 未有数据后续完善")
    @ApiOperation("查询服务情况数据 未有数据后续完善")
    @AnonymousGetMapping("/getLargeService")
    public ResponseEntity<Object> getLargeService() {
        return new ResponseEntity<>(largeService.getLargeService(), HttpStatus.OK);
    }

    @Log("查询投融资对接情况数据  除投资机构数外其他待完善")
    @ApiOperation("查询投融资对接情况数据 除投资机构数外其他待完善")
    @AnonymousGetMapping("/getFinanceAbutmentDto")
    public ResponseEntity<Object> getFinanceAbutmentDto() {
        return new ResponseEntity<>(largeService.getFinanceAbutmentDto(), HttpStatus.OK);
    }


    @Log("查询项目库赛道领域饼图")
    @ApiOperation("查询项目库赛道领域饼图")
    @AnonymousGetMapping("/getPie")
    public ResponseEntity<Object> getPie(Integer level) {
        return new ResponseEntity<>(largeService.getPie(level), HttpStatus.OK);
    }

    @Log("小程序查询已收录导师数、已收录项目数、投融资成交额、知识产权数量")
    @ApiOperation("小程序查询已收录导师数、已收录项目数、投融资成交额、知识产权数量")
    @AnonymousGetMapping("/getXcxData")
    public ResponseEntity<Object> getXcxData() {
        return new ResponseEntity<>(largeService.getXcxData(), HttpStatus.OK);
    }


    @AnonymousGetMapping("/getTestData")
    public ResponseEntity<Object> getTestData() {
        return new ResponseEntity<>("11", HttpStatus.OK);
    }

}